app.controller('picStorageCtr', function($element, $scope, $state, rest, user, $compile, uploadConf, uiLoad) {
    var data = angular.copy($scope.ngDialogData, {});
    $scope.params = {
      landlordId: user.get('landlordId')
    };
    $scope.folderList = [];

    $scope.column2 = 0;      //分栏
    $scope.maxImgNum = 100;    //最大图片数量
    $scope.imgNew= [
        {
            text:'请选择要上传的图片',
            name: 'uploadPic',
            value: []
        }
    ];   
       
    uploadConf.column2 = $scope.column2;
    uploadConf.maxImgNum =  $scope.maxImgNum;
    uploadConf.imgNew = $scope.imgNew;

    $scope.newFolder = function(){
      // var folderList = $scope.folderList;
      // var folder = document.createElement("div");
      // folder.innerHTML = $scope.folderName;
      // document.getElementById("folderList").append($scope.folderName);
      var obj={name:$scope.folderName }; 
      $scope.folderList.push(obj);
      console.log($scope.folderList);
    };

// $scope.makeSureConfirm = function() {

//       //照片上传
//       $scope.params.uploadPic = [];

//       for (var i in uploadConf.imgNew[0].value) {
//           $scope.params.uploadPic.push(uploadConf.imgNew[0].value[i]);
//       }
      
//       rest.post({
//           methodId: '4009',
//           data: $scope.params,
//           success: function(res) {
//               $state.go('app.houseOwner.list');
//           },
//           error: function() {}
//       })


//         $scope.confirm({});
//     }


});
